package com.columboid.protocol.syncml.tests;

import junit.framework.TestCase;

import org.junit.Ignore;
import org.junit.Test;

import com.columboid.protocol.syncml.ClientCredential;
import com.columboid.protocol.syncml.ServerCredential;

public class CredentialTest extends TestCase {

	@Test
	public void testNonceGeneration() {

		ServerCredential credential = new ServerCredential();
		String nonceToken = credential.getNonceToken();
		assertTrue(nonceToken != null);
	}

	@Test
	public void testClientNonce() {
		ClientCredential credential = new ClientCredential();
		String nonceToken = credential.getNonceToken();
		assertTrue(nonceToken == null);
	}

	@Test
	public void testNonceWillbeDifferentForEachRequest() {
		ServerCredential credential = new ServerCredential();
		String nonceToken1 = credential.getNonceToken();
		String nonceToken2 = credential.getNonceToken();
		assertTrue(nonceToken1 != nonceToken2);
	}

	@Test
	@Ignore("This is ignored for now before the Credential communication is established")
	public void testChanllengeComeswithNonceAndPassword() {
		assertTrue(true);
	}

	@Test
	@Ignore("This is ignored for now before the Credential communication is established")
	public void testNoCredentialShouldReturnFalseAuthorization() {
		assertTrue(true);
	}

	@Test
	@Ignore("This is ignored for now before the Credential communication is established")
	public void testNoCredentialShouldReturnWithNonce() {
		assertTrue(true);
	}

	@Test
	@Ignore("This is ignored for now before the Credential communication is established")
	public void testVerfiedAuthorizationShouldReturnTrue() {
		assertTrue(true);
	}

}
